package com.zijie.hosptal.job;

import com.zijie.hosptal.mapper.DoctorSchedulesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DsTask {

    private DoctorSchedulesMapper doctorSchedulesMapper;

    @Autowired
    public void setDoctorSchedulesMapper(DoctorSchedulesMapper doctorSchedulesMapper) {
        this.doctorSchedulesMapper = doctorSchedulesMapper;
    }
    @Scheduled(cron = "0 0 0 * * ?")
    public void updateStatus() {
        doctorSchedulesMapper.updateStatus();
    }
    @Scheduled(cron = "0 0 0 * * ?")
    public void updateStatus5() {
        doctorSchedulesMapper.updateStatus5();
    }
}
